package com.aacar.op.utils;


import com.google.common.collect.Maps;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;

/**
 * 系统配置
 */
public class DefineAppConfig {

    private static Logger logger = LoggerFactory.getLogger(DefineAppConfig.class);

    public static String ctx; //上下文根
    public static String static_host;
    public static String washer_header_host;
    public static String OrderMessage_SMS_Template;
    public static String systemConf;



    static {
        logger.debug("加载系统配置:{}", "app_config.properties");
        PropertiesLoader loader = new PropertiesLoader("/app_config.properties");
        static_host = loader.getProperty("aacar.static.root.host");
        washer_header_host = static_host + loader.getProperty("aacar.static.washer.header.path");
        OrderMessage_SMS_Template = "SMS_130840837";
        systemConf = loader.getProperty("system.conf");
    }

    

    public static Map<String, Object> asMap() {
        Map<String, Object> map = Maps.newHashMap();
        map.put("ctx", ctx);
        map.put("upload_host", static_host);
        map.put("washer_header_host", washer_header_host);
        return map;
    }


}
